package lab01;

import java.util.Scanner;

public class Test08 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个数：");
        int guessnumber = (int) (Math.random() * 100) + 1;
        while (true) {
            int result = sc.nextInt();
            if (result > guessnumber) {
                System.out.println("猜大了");
            } else if (result < guessnumber) {
                System.out.println("猜小了");
            } else {
                System.out.println("猜对了");
                break;
            }
        }
    }
}
